package com.yanqu.road.entity.activity.operamask;

import com.yanqu.road.entity.activity.operamask.game.OperaMaskBlock;
import com.yanqu.road.entity.activity.operamask.game.OperaMaskSkill;

import java.util.ArrayList;
import java.util.List;

public class OperaMaskGameData {

    private int sceneId;                                        // 关卡ID
    private long score;                                         // 雅韵值
    private List<OperaMaskSkill> skillList = new ArrayList<>();                      // 技能
    private List<List<OperaMaskBlock>> blockList = new ArrayList<>();                // 盘面
    private int boxLevel = 1;                                   // 油彩盒等级，从1开始
    private int boxValue;                                       // 油彩盒当前进度
    private int useStep;                                        // 使用步数
    private int leftStep;                                       // 剩余步数
    private List<Integer> chooseSkill = new ArrayList<>();      // 油彩盒下次升级可选技能
    private int randomTimes;                                    // 付费随机技能次数
    private int skipTimes;                                      // 跳过选技能次数
    private long beginTime;

    private boolean newRecord = false;                          // 突破历史最高
    private long oldTopScore = 0;                               // 旧历史最高分
    private int oldSceneRank = -1;                              // 旧剧目排名

    private int skillAddStep;

    private int allRandomTimes;                                 // 技能全部随机次数

    private int eliminateBlockAmount;                           // 消除的油彩数

    public OperaMaskGameData clone() {
        OperaMaskGameData data = new OperaMaskGameData();
        data.setSceneId(getSceneId());
        data.setScore(getScore());
        List<OperaMaskSkill> tmpSkill = new ArrayList<>();
        for (OperaMaskSkill skill : getSkillList()) {
            tmpSkill.add(skill.clone());
        }
        data.setSkillList(tmpSkill);
        List<List<OperaMaskBlock>> tmpBlock = new ArrayList<>();
        for (List<OperaMaskBlock> list : getBlockList()) {
            List<OperaMaskBlock> tmp = new ArrayList<>();
            for (OperaMaskBlock block : list) {
                tmp.add(block.clone());
            }
            tmpBlock.add(tmp);
        }
        data.setBlockList(tmpBlock);
        data.setBoxLevel(getBoxLevel());
        data.setBoxValue(getBoxValue());
        data.setUseStep(getUseStep());
        data.setLeftStep(getLeftStep());
        data.setChooseSkill(new ArrayList<>(getChooseSkill()));
        data.setRandomTimes(getRandomTimes());
        data.setSkipTimes(getSkipTimes());
        data.setBeginTime(getBeginTime());
        data.setNewRecord(isNewRecord());
        data.setOldTopScore(getOldTopScore());
        data.setOldSceneRank(getOldSceneRank());
        data.setSkillAddStep(getSkillAddStep());
        data.setAllRandomTimes(getAllRandomTimes());
        data.setEliminateBlockAmount(getEliminateBlockAmount());
        return data;
    }

    public int getSkipTimes() {
        return skipTimes;
    }

    public void setSkipTimes(int skipTimes) {
        this.skipTimes = skipTimes;
    }

    public int getRandomTimes() {
        return randomTimes;
    }

    public void setRandomTimes(int randomTimes) {
        this.randomTimes = randomTimes;
    }

    public int getSceneId() {
        return sceneId;
    }

    public void setSceneId(int sceneId) {
        this.sceneId = sceneId;
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        this.score = score;
    }

    public List<OperaMaskSkill> getSkillList() {
        return skillList;
    }

    public void setSkillList(List<OperaMaskSkill> skillList) {
        this.skillList = skillList;
    }

    public List<List<OperaMaskBlock>> getBlockList() {
        return blockList;
    }

    public void setBlockList(List<List<OperaMaskBlock>> blockList) {
        this.blockList = blockList;
    }

    public int getBoxLevel() {
        return boxLevel;
    }

    public void setBoxLevel(int boxLevel) {
        this.boxLevel = boxLevel;
    }

    public int getBoxValue() {
        return boxValue;
    }

    public void setBoxValue(int boxValue) {
        this.boxValue = boxValue;
    }

    public int getUseStep() {
        return useStep;
    }

    public void setUseStep(int useStep) {
        this.useStep = useStep;
    }

    public int getLeftStep() {
        return leftStep;
    }

    public void setLeftStep(int leftStep) {
        this.leftStep = leftStep;
    }

    public List<Integer> getChooseSkill() {
        return chooseSkill;
    }

    public void setChooseSkill(List<Integer> chooseSkill) {
        this.chooseSkill = chooseSkill;
    }

    public long getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(long beginTime) {
        this.beginTime = beginTime;
    }

    public boolean isNewRecord() {
        return newRecord;
    }

    public void setNewRecord(boolean newRecord) {
        this.newRecord = newRecord;
    }

    public long getOldTopScore() {
        return oldTopScore;
    }

    public void setOldTopScore(long oldTopScore) {
        this.oldTopScore = oldTopScore;
    }

    public int getOldSceneRank() {
        return oldSceneRank;
    }

    public void setOldSceneRank(int oldSceneRank) {
        this.oldSceneRank = oldSceneRank;
    }

    public int getSkillAddStep() {
        return skillAddStep;
    }

    public void setSkillAddStep(int skillAddStep) {
        this.skillAddStep = skillAddStep;
    }

    public int getAllRandomTimes() {
        return allRandomTimes;
    }

    public void setAllRandomTimes(int allRandomTimes) {
        this.allRandomTimes = allRandomTimes;
    }

    public int getEliminateBlockAmount() {
        return eliminateBlockAmount;
    }

    public void setEliminateBlockAmount(int eliminateBlockAmount) {
        this.eliminateBlockAmount = eliminateBlockAmount;
    }
}
